<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>菜单管理</title>
<#include "/common/lib/layui-lib.html"/>
</head>
<body>
	<div class="layui-btn-group" style="margin-left:5px;">
		<button id="addMenu" class="layui-btn layui-btn-normal">新增菜单</button>
		<button id="editMenu" class="layui-btn layui-btn-normal">编辑</button>
		<button id="deleteMenu" class="layui-btn layui-btn-normal">删除</button>
		<button id="refresh" class="layui-btn layui-btn-normal">刷新</button>
	</div>
	<div id="menutree" class=""></div>
	<script id="view" type="text/html">
        <table class="layui-table">
            <thead>
                <tr>
                    <th>菜单名称</th>
                    <th>菜单编号</th>
                    <th>菜单类型</th>
                    <th>图标</th>
                    <th>URL</th>
                    <th>顺序号</th>
                </tr>
            </thead>
            <tbody>
                {{# layui.each(d.rows,function(index,r){ }}
                <tr>
                    <td><input type="checkbox" />{{r.menuName}}</td>
                    <td>{{=r.menuId}}</td>
                    <td>{{getMenuTypeNameByCode(r.menuType)}}</td>
                    <td>{{=r.menuIcon}}</td>
                    <td>{{r.menuUrl}}</td>
                    <td>{{r.sort}}</td>
                </tr>
                {{# }); }}
            </tbody>
        </table>
    </script>
	<script id="formftl" type="text/html">
		<form id="myform" class="layui-form layui-form-border" action="">
			<!--隐藏表单字段区-->
			<input type="hidden" id="optname" name="optname">
			<input type="hidden" id="menuId" name="menuId">
			<!--显示表单字段区-->
		    <div class="layui-form-item">
				<label class="layui-form-label">菜单名称</label>
				<div class="layui-input-block">
					<input type="text" name="menuName" required lay-verify="required" autocomplete="off" placeholder="请输入菜单名称" class="layui-input">
				</div>
			</div>
			<div class="layui-form-item">
				<div class="layui-inline">
					<label class="layui-form-label">父菜单编号</label>
					<div class="layui-input-block">
						<input type="text" name="parentId" lay-verify="required" autocomplete="off" placeholder="请输入父菜单编号" class="layui-input">
					</div>
				</div>
				<div class="layui-inline">
					<label class="layui-form-label">顺序号</label>
						<div class="layui-input-block">
							<input type="text" name="sort" autocomplete="off" placeholder="请输入顺序号" class="layui-input">
						</div>
					</div>
				</div>
			<div class="layui-form-item">
				<label class="layui-form-label">RUL</label>
				<div class="layui-input-block">
					<input type="text" name="menuUrl" autocomplete="off" placeholder="请输入URL地址" class="layui-input">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">菜单类型</label>
		      	<input type="radio" name="menuType" lay-verify="menuType" value="top" title="顶部菜单">
				<input type="radio" name="menuType" value="left" title="侧边菜单" checked>
		  	</div>
			<button id="mybutton" lay-submit lay-filter="mybutton"/>
		</form>
    </script>
	<script src="/js/app/system/menu/menu.js" type="text/javascript"></script>
</body>
</html>